package com.walker.taogong.hibernate.impl;

import javassist.util.proxy.ProxyFactory;
import javassist.util.proxy.ProxyFactory.ClassLoaderProvider;

public class JavaAssistHelper
{
    public static ClassLoaderProvider createJavaAssistClassLoader()
    {
        ProxyFactory.classLoaderProvider = new ProxyFactory.ClassLoaderProvider()
        {
            @Override
            public ClassLoader get(ProxyFactory pf)
            {
                return getClass().getClassLoader();
            }
        };
        return ProxyFactory.classLoaderProvider;
    }
}
